General Topics This section details several general AutoAddress topics. Version 3.01 9/22/92. Written in FoxBase+/Mac Copywrite J. Serdakowski, Ph.D., M.B.A., P.E. Please don't use my program unless you purchase a copy. At $49 for a single user and $99 for a 10 user one site, it really is quite inexpensive. [FoxBase+/Mac is a trademark of MicroSoft] tabase other than the one in the current work area, the field name may be prefixed by the alias name, or the work area name, and the operator. For example: You're in work area B, and you need to access a field called lastnData Types The fields that make up the records that make up the files that make up your AutoAddress database management system are all Character types, with the exception of the 'Tag' field, which is a logical type. Character data type consists of all the characters on the keyboard: letters, numbers, punctuation symbols and special characters (like the plus sign, dollar sign, percentage symbol, etc.). Character data may consist of all numbers, as in a telephone number or zip code, provided you don't plan to use them for calculations. To convert character types to numbers, the VAL() function must be used. To convert character types to dates, the CTOD() function must be used. Numeric data consists of numbers, a decimal point and a leading plus or minus sign. This is the data type you should use for items that will be used in calculations. Numeric data can vary in length up to a maximum of 16 digits. Date type data is a special type with a fixed length of 8 positions. The format that you use for storing date data, however, is flexible. For instance, you can specify that dates should be in American (mm/dd/yy), British (dd/mm/yy), Italian (dd-mm-yy), French (dd/mm/yy) or ANSI (yy.mm.dd) format. You can also tell FoxBASE+/Mac to display date data with a 4 digit year format (i.e., mm/dd/yyyy - 12/06/1952). Logical data is a fixed length type of 1 position. This type of data indicates a true/false (or yes/no) condition. fining a database structure, memo fields are defined with a fixed length (10 positions), however, the actual size of memo fields is limited only by available disk space. Typically, memo fields are used for descriptive text that is likely to exceed the 254 character limit of character type data. Picture data consists of any graphical items. Because the size of picture data can vary widely, it is treated in a similar fashion to memo fields. condition. Memo data is a special form of text data. When defining a database structure, memo fields are defined with a fixed length (10 posi Expressions Many FoxBASE+/Mac commands and functions require or permit expressions as part of their formats. An expression is a combination of variables, constants, functions and operators that can be reduced to a character string, a number, a logical value, or a date. Most commands and functions require expressions that evaluate to a specific data type. However, commands like STORE and ? may accept any type of expression. While date expressions may contain both date and numeric operands, the operands making up any other expressions must be the same data type. Also, some commands and functions require an expression list, which is one or more expressions separated by commas. A variable or constant represents a storage place for a specific piece of data. The contents of variables may change during execution whereas those of constants may not. A variable may be a database field or a memory variable and must be referenced by its name which consists of up to 10 letters, digits, or underscores beginning with a letter. A function may be used in an expression if its result has the appropriate data type. See Chapter 9 in the manual for information on individual functions. For and While The scope for an operation can be determined by the use of a conditional clause in many FoxBASE+/Mac commands. The FOR and WHILE clauses both indicate which records will be affected during a database operation. The records that will be affected are determined by the logical expression for each record that is read. The WHILE clause causes records to be read only as long as the condition is true. The first time the condition is false, the database operation ceases. When the FOR clause is used, all records that meet the condition are affected by the database operation. Regardless of whether the condition is true or false, the entire database is searched. FOR and WHILE clauses may appear together in the same FoxBASE+/Mac statement and may also be used in conjunction with other scope indicators (ALL, NEXT, RECORD, or REST). When FOR and WHILE are both used, the WHILE condition takes precedence. Menus MENU Menu creation facility Format MENU BAR [[,]] MENU ,[,] MENU OFF [,] ON MENU [] MENU(0|1) The MENU BAR command is used to install the menu bar into the menu bar after the Apple, File and Edit menus. The items in the must be character type. By default all elements become menu titles. can be specified to limit the number of elements that become menu titles. For example, if contains 10 elements, to add 3 titles to the menu bar (after Apple, File and Edit) should have the value 3. The first 3 elements in the become menu titles. MENU BAR with no arguments will reestablish the FoxBASE+/Mac menu system. The MENU command installs a menu into a specified position in the menu bar. specifies the position of the menu . The first menu after the Edit menu is position 1. The elements in the must be character type. By default all the elements of are installed as menu items. To limit the number of elements in to be used as menu items, specify . For example, if the value of is 4, then the first 4 elements in are used as menu items. Meta characters may be embedded in the individual elements to control the appearance and bahavior of the menu items. The MENU OFF command disables an entire menu or a particular item in the specified menu. To disable an entire menu, use the form MENU OFF . indicates the position of the menu to be disabled. When a menu is disabled, it appears grayed . To disable an individual item in a menu, use the form ,. Once again, indicates the position of the menu to be disabled. indicates the position of the menu item to be disabled. The MENU function with 0 as an argument returns as a numeric value the position of the last menu to receive a menu hit. With 1 as an argument, it returns as a numeric value the position of the last menu item to receive a menu hit. These two values together reveal the exact item that received the last menu hit. Commonly these values are passed as parameters to a menu handling routine. The ON MENU command defines the action to be taken should a menu hit occur. When a menu hit occurs the READ or WAIT is terminated and is executed. Typically is a DO statement with a WITH clause which passes MENU(0) and MENU(1) to a menu handling program. Operators The operators available in FoxBASE+/Mac are grouped into four major categories: logical, arithmetic, relational, and string. LOGICAL Operators (in order of precedence) ( ) used to group expressions .NOT., ! logical negative .AND. logical AND .OR. logical inclusive OR ARITHMETIC Operators (in order of precedence) ( ) used to group expressions **, ^ exponentiation *, / multiplication and division +, - addition and subtraction RELATIONAL Operators < less than > greater than = equal to <>, # not equal to <= less than or equal to >= greater than or equal to $ substring comparison == character string comparison (trailing blanks are significant when EXACT is ON) STRING Operators + string concatenation(straight forward) - string concatenation (trailing blanks are moved from the first string to the end of the second string) Pictures FoxBASE+/Mac supports a picture data type. Pictures stored in databases may be either monochrome or full color. Pictures are placed in databases using the customary cut and paste operations. They may be either clipped or scaled to a rectangular frame of any size when displayed. Database pictures may even be used as buttons in input forms. Scope In many commands, you will see the phrase scope in the command definition. This is used to indicate for which records of the database currently in USE a particular operation is to be performed. A scope can be defined using one of the following formats: indicates that the operation is to take place for all records in the database. NEXT indicates that the operation is to be carried out for the next records in the database. RECORD indicates that database record number is to be the subject of the current operation. REST indicates that the operation is to be carried out for a range of records beginning with the current record and ending with the last record in the file. User-Defined Functions A UDF is simply a FoxBASE+/Mac program that contains a set of valid FoxBASE+/Mac statements and RETURNs a value to the calling program. As with regular programs, the UDF may be included in a procedure file and/or be compiled. In fact, a UDF may be called as a program with the DO command from some places in an application and called as a function from others. However, a program that is to be referenced as a User-Defined Function must RETURN a value to the calling program; otherwise, a syntax error will result. A UDF is referenced by its name (the name of the program or procedure module) followed by parentheses that optionally contain arguments. If arguments are included in the UDF reference, the first statement in the UDF must be a corresponding PARAMETER statement. If a UDF has the same name as a built-in function (or its abbreviation), the built-in function takes precedence. References to UDF's may occur only in: STORE statements REPLACE statements Control statements (IF, WHILE, CASE, etc) Print Statements (?, ??) Display and List @...GET...VALID edence. References to UDF's may occur only in: STORE statements REPLACE statements Control statements (IF, WHILE, CASE, etc) Print Statements (?, ??) Display and List @...GET...VALID WARNING: The statements contained in a User-Defined Function should not alter the state of open database files. For example, changing filters or relations, switching the currently selected database, or Commands and Functions This section describes the commands available in AutoAddress. These commands can help advanced users do very elaborate reports. ual. We recommend that you explore the HELP feature thoroughly, as it's a very convenient and quick reference while you're using FoxBASE+/Mac. If you are not familiar with the FoxBASE+/Mac command language we strongly suggest that you complete the tutorial. Format: $ This function returns if is contained in , if it is not. See also: AT() Format: &[.] The function signals that FoxBASE+/Mac is to perform a macro substitution. It must precede the name of a character memory variable. The value of replaces the & and the variable name which follows it. The command is then executed exactly as if it had originally been typed including the characters from the variable. Normally, the characters inserted by & are followed by one or more blanks. Use of a . (period) delimiter is used for concatenating additional characters onto a macro expansion. The character string substituted by the & function may itself contain &s. If a memory variable exists whose name follows such a nested &, that variable's content is also substituted in the command. Macros (& functions) can be nested in this manner as desired. It is not legal to have a variable reference itself recursively in a macro. For instance, the following will generate an error message: STORE "&x" TO x? &x Also, the complete expansion of any macro may not exceed the maximum statement length permitted in FoxBASE+/Mac. This limit is currently 255 bytes. Evaluate expressions, display results Format: ? [?] [, , ...] ? is the What do these expressions evaluate to? command. The listed expressions are evaluated, and their values are displayed. Use just one question mark when you want the results to appear on the next line on the screen or printer at the far left. Use two consecutive question marks when you want FoxBASE+/Mac to display the results on the current line at the current output position. @ ... CLEAR- Clear an area of the screen Format: @ [CLEAR | CLEAR TO <>] This form of the "@" command clears an area of the screen. If you omit the CLEAR and CLEAR TO options, the line on the row you specify is cleared starting at the column you specify. If you use the CLEAR option, a rectangular area on the screen is cleared whose upper left corner is and whose bottom right corner is the bottom right corner of the screen. If you use the CLEAR TO option, a rectangular area is cleared as above, except that the second pair delimits its bottom right corner. xxPxPxx xxPxPxxsg @... TO ... DOUBLE- Draw a box Format:@ TO [DOUBLE] [STYLE ] [COLOR ] This form of the "@" command draws a box where are the coordinates of the upper left corner of the box and are the coordinates of the lower right corner of the box. If the row1 and row2 are the same, a horizontal line is drawn. If the column coordinates are the same, a vertical line is drawn. If the DOUBLE option is used, the box will be drawn using a double rather than a single line. The STYLE specification controls the method of placing or displaying objects to an output device. The output device can be the monitor or a print document. This single, 32-bit numeric value (known as a word) is divided into five 4-bit values, with the upper twelve bits of the STYLE word reserved for future use. (Complete information on the effects of the STYLE word can be found at the @SAY/GET command.) Foreground and background colors can be specified with the COLOR clause, using one of two approaches. If no COLOR clause is specified then the text is displayed in the current screen color. COLOR [][,] This COLOR clause allows you specify the standard and/or enhanced color settings to be used. You specify the color settings with letter codes, using a character string expression that must be enclosed in quotation marks. This is different from the SET COLOR command which does not allow quotation marks around the color codes. Standard and enhanced display colors are both determined by selecting a pair of the following color codes separated by a slash (/). For example: COLOR "R/W,G/B" or COLOR ",GB". COLOR ,,[,,,] The second variation of the color clause uses three or six numeric expressions to assign pen and fill colors. The first three numeric expressions represent the red, green and blue (RGB) values to be assigned to the pen color, while the three optional expressions represent the RGB values of the fill color. The numbers derived from each expression should be in the range of 0 to 65,535, although numbers greater than 65,535 roll-over to 0 (65,536=0, 65,537=1, etc.) and numbers less that zero roll-back to 65,535 (-1=65,535, -2=65,534, etc.). @WARNING = PROGRAMMER'S TIP: Program readability will be enhanced if you define PUBLIC memory variables to represent the expressions in the COLOR and FONT clauses. and FONT clauses. SAY/GET- Perform I/O at specified row and column Format: < [PIXELS] row,col> [[SAY ] [PICTURE ] [FUNCTION ]] [[GET ] [PICTURE ] [FUNCTION ] [RANGE [] [,]] [VALID|]] [SIZE ,] [STYLE ] [FONT [][<,expN>]] [COLOR ] Use this variation of the @ command to display formatted output on the screen and/or printer or to create input screens. A pair of numeric expressions representing the position where output will appear. A character-valued expression which controls how output will be edited prior to display. A character-valued expression containing "function codes" which specify additional editing steps to be applied before output is displayed. Screen / Printer Coordinates <[PIXELS] row,col> For screen I/O, the first row is number 0. Rows are numbered from top to bottom. The number of available rows is determined by the FONT and SIZE declaration in the SCREEN command or the size specified in the SET SCREEN command. For printers, the physical page size determines the number of available rows. If the PIXEL clause is present, the row coordinate is the number of pixels from the top of the screen or paper and is not affected by the current screen settings. Like rows, the first column is column 0. Columns are numbered from left to right. The number of available columns is determined by the FONT and SIZE declarations in the SCREEN command or the size specified in the SET SCREEN command. For printers, the physical page size determines the number of columns. If the PIXEL clause is used, the column coordinate is the number of pixels from the left edge of the screen or paper and is not affected by the current screen font. Row and column coordinates in @...SAY output, that's being sent to a print device, can be used to cause an automatic page eject (provided the STYLE clause is not being used). If the row coordinate is smaller than the previous value, a page eject will be issued before this line of output is sent to the printer. Likewise, for two consecutive output lines that have the same row value, if the column coordinate of the second output line is not larger than the column coordinate of the first, a page eject will be issued before the line is output. SAY Clause If the SAY clause is present, is evaluated and displayed starting at . By default, output goes to the screen as normal, "non-intense" text. If SET DEVICE TO PRINT is issued, output is directed to the printer -- a subsequent SET DEVICE TO SCREEN command must be issued to redirect output from SAYs to the screen. The @ ...SAY clause may be used in format files. @SAY ... PICTURE If the PICTURE clause is present, the value of is edited according to the specified before it is displayed. This character string may consist of FUNCTION codes, PICTURE template codes, or a combination of both. If FUNCTION codes are used, they appear first in preceded by "@". As many FUNCTION codes as desired may immediately follow the "@" with no embedded spaces. The last FUNCTION code in the string must be followed by one or more spaces. These signal the end of the FUNCTION codes and the start of the PICTURE template codes. FUNCTION and PICTURE codes are listed at the end of this section. @SAY...FUNCTION The FUNCTION clause offers an alternate means of including editing FUNCTION codes in the string used to edit SAY output. It is not necessary to include the "@" before the FUNCTION codes. Specifying FUNCTION codes in the FUNCTION clause is equivalent to doing so in the PICTURE clause, but it does make the PICTURE templates appear less cryptic, and therefore easier to maintain. GET Clause If the GET clause is present, a full-screen edit operation is undertaken either starting at or at the next screen position following the end of the output generated by the SAY clause. If INTENSITY is SET OFF, the default setting, the GET fields are displayed with a border. If INTENSITY is SET ON, the GET fields are displayed in "intense" screen display mode -- normally inverse video. If both the SAY and GET clauses are present, a space is automatically inserted at the end of the SAY output and before the GET output. The READ command must be used after the GET to initiate editing of the fields. The GET clause is ignored if the SET DEVICE TO PRINT command has been issued. An array memory variable may be specified as the GET , however, the array subscripts are evaluated only when the GET statement is executed. If array subscript values change after the GET and prior to the READ, the subscripts used for READ will be those in effect at the time the GET command was executed. @GET...PICTURE @GET...FUNCTION These clauses have the same purpose here as in the SAY clause, except they are used to edit input data entered in response to a GET. @GET...RANGE [][,] The RANGE option may be used with date and numeric variables. It allows the user to specify a range of values within which screen input must lie. The values specified must be either numeric or date expressions depending on whether contains numeric or date data. If the value entered is not in the specified range, a message is displayed on the screen that includes the correct range. Either the upper or lower bound of a RANGE may be omitted (but not both). If omitted, that portion of the range check is bypassed. @GET...VALID | The VALID clause is used to validate user input as part of the @...GET command. A particularly effective approach to input validation is to have a user-defined function as the VALID expression. During a READ operation, when input for a field with a VALID clause is complete, or is evaluated using the value of just input. @HEADING4 = With A Logical Expression If is ".T.", the input is considered to be correct and READ proceeds to the next field to be input. If is ".F.", the value is considered to be incorrect, and a message is displayed directing the user to reenter the data after pressing the space bar -- this process continues until is ".T." or Esc is pressed. With A Numeric Expression If a numeric expression is used rather than a logical expression, different types of action can be taken depending on the value that's returned. In general, a VALID clause that returns a numeric value is indicating which field should be the next input field accessed by the READ. In addition, a VALID clause that returns a numeric value instead of a logical value will cause the standard validation error message to be suppressed. If a zero is returned from a numeric VALID clause, the insertion point remains in the same field, indicating that a validation error has occurred (just as if a logical .F. has been returned). However, since the standard error message is suppressed when using a numeric expression, a customized error message may be displayed if so desired. If a non-zero number is returned from a numeric VALID clause, the number is used to indicate the next field that the READ will input. A positive number indicates the relative number of fields that the READ command should advance to determine the next GET field. For example, if you're positioned on the fifth GET field and the VALID clause returns a two, the seventh GET field becomes the next input field. A negative number indicates the relative number of fields that the READ command should back up to determine the next GET field. For example, if you're positioned on the fifth GET field and the VALID clause returns a negative two, the third GET field becomes the next input field. In either case, the value that was entered in the fifth GET field does not change. Also, if the next GET field indicated by the VALID clause does not exist, the READ is terminated. @WARNING = NOTE: If the value of is not modified during input (for instance, if Enter is pressed without first making other entries), then the RANGE check is not performed. The VALID check is performed in all instances. SIZE , The SIZE specification controls the size and shape of the data field that will be displayed. is the number of rows (or the height) and is the number of columns (or the length). The actual size of the field box is determined by the font size; the larger the font, the larger the field box will be. If the keyword PIXEL is specified as part of the command, the SIZE clause is considered in pixel values. The text will be displayed in the current screen font, unless the FONT clause is also specified. STYLE The STYLE specification controls the method of placing or displaying objects to an output device. The output device can be the monitor or a print document. This single, 32-bit numeric value (known as a word ) is divided into five 4-bit values, with the upper twelve bits of the STYLE word reserved for future use. (If you use STYLE, be sure to use numeric values that set the upper bits to zero.) The value contained in the STYLE word affects five different text and object settings: Pen Pattern- The pattern that will be used for a line or box outline. Pen Width-The width of a line or box outline. Fill Pattern- The pattern that will be used to fill box objects. Radius- The radius value used with rounded rectangles. Transfer Mode- The method of pixel arrangement and placement used when displaying text and objects. Rectangles use the entire STYLE word, lines use all settings except the radius, and most other objects only use the Transfer Mode value. Using the STYLE clause in an @...SAY statement will suppress the automatic page eject feature of FoxBASE+/Mac if the coordinates of the output line are lower than the previous line. If all output lines use the STYLE clause, the page EJECT command will need to be issued to eject the page from the printer. -Pen Pattern and FIll Pattern produce the same results for a given 4-bit arrangement. -The Pen Width portion of STYLE word determines the width of the line in pixels. -The Radius portion of STYLE determines the curvature on the corners of rounded rectangles. With the exception that zero is no curvature, radius is calculated with the formula: radius=(radius value*2)+4. -The Transfer Mode portion of the STYLE word determines the method of pixel arrangement and placement that's used when displaying text and objects. The Transfer Mode involves the interaction between the object you've selected and those objects that are behind it. On a machine with less than 4-bits of screen depth, the color modes will revert to regular transfer modes. Copy- This mode completely replaces what's behind the selected object with the selected object. Or- This mode causes the foreground portion only of the selected object to be placed on top of the object(s) behind; the objects are combined. Xor- This mode causes the foreground portion of the selected object, to invert the foreground of the object behind. Bic- This mode clears portions of the object behind using the foreground of the selected object. notCopy- This mode inverts the foreground and background of the selected object and completely replaces what's behind the selected object with the inverted object. notOr- This mode inverts the foreground and background of the selected object and causes only the background portion of the selected object to be placed on top of the object behind; the objects are combined, with the object(s) behind showing through the foreground portion. notXor- This mode inverts the foreground and background of the selected object and uses the background of the selected object, inverting it with the foreground of the object behind (producing a complement value). notBic- This mode inverts the foreground and background of the selected object and clears portions of the object behind using the background of the selected object. Blend- This color mode replaces pixels in the selected object with a weighted average of the colors of the object behind with the selected object. addPin- This color mode assigns the color closest to the sum of the RGB (red, green, blue) values of the selected object, pinned to a maximum allowable color of white. addOver- This color mode assigns the color closest to the sum of the RGB values for the object behind and the selected object. This mode, unlike addPin, is not pinned to a maximum value, but rather wraps around if the maximum is exceeded (value minus 65536). subPin- This color mode assigns the color closest to the difference of the sum of the RGB values of the selected object and the RGB values of the selected object, pinned to a maximum allowable color of black. Transparent- This color mode replaces the pixels in the object behind with those pixels from the selected object that aren't equal to the background color. adMax- This color mode compares the pixels of the selected object and those of the object behind and replaces those pixels in the object behind with a color containing the greater saturation of each of the color components (RGB). subOver- This color mode assigns the color closest to the difference of the RGB values for the object behind and the selected object. This mode, unlike subPin, is not pinned to a maximum value, but rather wraps around if the maximum is exceeded (65536 less the result). adMin- This color mode compares the pixels of the selected object and those of the object behind and replaces those pixels in the object behind with a color containing the lesser saturation of each of the color components (RGB). FONT [][,] The FONT clause may be used with both the SAY and GET commands. When the FONT clause is specified the data sent to screen will be the font style and/or size specified. This specification will override the current screen font. The font name must be enclosed in standard character string delimiters, and the point size must be separated from the font name with a comma. Either the font name, or the point size, or both may be specified. If the font name is omitted, the comma preceding the point size is still required. If either value is omitted, the omitted attribute will be the same as the current screen font. Using the FONT clause without a font name or point size will result in an error. To specifiy a typographical style in addition to the font and point size, add the following values, or any sum of these values, to the point size: VALUE,STYLE +256, Bold +512, Italic +1024, Underline +2048, Outline +4096, Shadow COLOR Foreground and background colors can be specified with the COLOR clause, using one of two approaches. If no COLOR clause is specified then the text is displayed in the current screen color. COLOR [][,] This COLOR clause allows you specify the standard and/or enhanced color settings to be used. You specify the color settings with letter codes, using a character string expression that must be enclosed in quotation marks. This is different from the SET COLOR command which does not allow quotation marks around the color codes. Standard and enhanced display colors are both determined by selecting a pair of the following color codes separated by a slash (/). For example: COLOR "R/W,G/B" or COLOR ",GB". COLOR ,,[,,,] The second variation of the color clause uses three or six numeric expressions to assign pen and fill colors. The first three numeric expressions represent the red, green and blue (RGB) values to be assigned to the pen color, while the three optional expressions represent the RGB values of the fill color. The numbers derived from each expression should be in the range of 0 to 65,535, although numbers greater than 65,535 roll-over to 0 (65,536=0, 65,537=1, etc.) and numbers less than zero roll-back to 65,535 (-1=65,535, -2=65,534, etc.). FUNCTION Editing Codes A- Allow alphabetic characters only. B- Left-justify numeric data. Use with numeric data only. C- A CR (credit) is displayed after a positive number. Use with numeric data and the SAY clause only. D- Edit data as a date using the current SET DATE format (e.g. BRITISH, GERMAN, etc.). Use with date, character and numeric data. E- Edit data as a European (BRITISH) date. Use with date, character, and numeric data. N-Does not allow data to be modified. Especially useful with text edit regions. R- Used with a that contains characters other than PICTURE template codes, the characters are displayed but not stored in . Use with character data only. S- Limit screen display width to characters where "" is an integer constant. Horizontally scroll the field within the columns specified. The rightarrow and leftarrow may be used to bring hidden portions of the field into view. Use with character data only. X- A DB (debit) symbol is displayed after negative numbers. Use with numeric data and the SAY clause only. Z-The field is displayed as all blanks if its numeric value is zero. Use with numeric data only. (- Negative numbers are enclosed in parentheses when this function is used. Use with numeric data only. !- Any character may be entered, however, alphabetic characters will be converted to uppercase. Use with character data only. It's possible to combine some functions within a single picture option, such as "@CX", which will cause a CR or DB to be displayed after each number. Certain combinations of function letters conflict and are therefore not allowed, such as "@DE". PICTURE Template Codes A PICTURE may include any desired characters, however, only those characters listed below actively participate in editing and data entry. If any other characters are entered in the format, they are displayed on output and, for input operations, appear in the screen field as comment information which is skipped over by the cursor. The characters which may be used with are described below. (Remember, if a format is a string literal, it must be enclosed in quotes.) A- Allows only alphabetic characters to be entered. L- Allows entry of logical data only. N- Allows entry of letters and digits only. X- Allows entry of any character. Y- Allows entry of logical Y, y, N, n only. This template will convert y and n to Y and N respectively. 9- Allows entry of digits only for character data. Allows entry of digits and signs for numeric data. #- Allows entry of digits, blanks and signs. !- Converts lowercase letters to uppercase letters. $- Fixed dollar sign. A dollar sign is displayed a fixed distance in front of the numeric value. $$-Floating dollar sign. A dollar sign is displayed directly to the left of the numeric value. The right dollar sign holds a digit position. *- Asterisks are displayed in front of the numeric value. May be used in combination with a '$' for check protection. .- Specify decimal point position. ,- Used to separate digits left of the decimal point. See also: COL( ), EDIT, INSERT, PCOL( ), PROW( ), READ, ROW(), SET BELL, SET CONFIRM, SET DEVICE, SET FIELDS, SET FORMAT, SET INTENSITY, UDF's digits left of the decimal point. See also: COL( ), EUser-defined Check Box Format: @ < [PIXELS] row,col> SAY|GET \ PICTURE|FUNCTION "[@]*c " [SIZE,] [STYLE] [FONT [][<,expN>]] [COLOR] Once the check box has been activated by issuing the READ command, the pointer changes to button pusher when is is positioned over a check box. Selecting a check box that is not checked will cause the box to become checked. Selecting a checked box results in removal of the check. Check boxes differ from other screen I/O mechanisms because only one check box may be specified per GET statement. The GET variable may be either numeric or logical, memory variable or database field. Depending on the variable type, an unchecked box corresponds to the value 0 or .F. and a checked box to a 1 or .T.. Rows are numbered from top to bottom. Columns are numbered from left to right. When the box specified is checked or unchecked, a specific value is returned to . The variable must be declared prior to issuing the @ GET command and may be a memory variable or a numeric field in a database file. The GET variable may be either numeric or logical. Depending on the variable type, an unchecked box corresponds to the value 0 or .F. and a checked box to a 1 or .T.. To check or uncheck a check box, just move the pointer over the check box and click the mouse. When the keyword PICTURE is specified, an preceded by an indicates that the to follow is to be treated as a check box. The keyword FUNCTION may be specified as an alternative to the keyword PICTURE. If FUNCTION is used as an alternative, it is not necessary to include the before the is a character string literal which may contain any desired characters except a quote or a semicolon. The SIZE specification has no effect on the size or placement of check box controls. It's provided for syntactical compatibility with and ease of conversion to other @SAY/GET controls. The STYLE specification controls the method of placing or displaying objects to an output device. The output device can be the monitor or a print document. When the FONT clause is specified the data sent to screen will be the font style and/or size specified. This specification will override the current screen font. Foreground and background (pen and fill) colors can be specified with the COLOR clause. If no COLOR clause is specified then the picture is displayed in the current screen color. The text in a check box is displayed in the current screen font and color unless the FONT and/or COLOR clauses are specified. For more detailed information on specifing the SIZE, STYLE, FONT and COLOR refer to the @ GET/SAY topic. User-defined Picture Buttons Format: @ < [PIXELS] row,col> SAY|GET PICTURE|FUNCTION "[@]*[] nnn[;nnn][; ][;nnn]" [SIZE,] [STYLE] [COLOR] By default picture buttons are displayed in a horizontal row. All buttons regions are the same size as determined by the size of the largest picture specified in the list. That is, all button widths are set to the minimum width and height needed to contain the largest picture in the picture list. Once the picture button has been activated by issuing the READ command, the pointer changes to the button-pusher when it is positioned over a picture button. By default, once a button has been pushed, the READ is terminated. To alter the default behavior to allow for non-terminating picture buttons, the